/**
 * 打印模板样式
 * 用于洗水唛打印预览和实际打印
 * 包含模板A、B、C、D的所有样式
 */

/* ==================== 打印页面设置 ==================== */
@media print {
  @page {
    size: auto;
    margin: 3mm;
  }

  body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #000;
  }

  /* 打印时隐藏尺寸提示 */
  .size-hint {
    display: none !important;
  }

  /* 防止分页截断 */
  .print-template {
    page-break-inside: avoid;
  }

  /* 打印时确保边框可见 */
  .bottom-border {
    border-bottom: 1px solid #000 !important;
  }

  .right-border {
    border-right: 1px solid #000 !important;
  }
  .care-template-box{
    box-shadow: 0 0 0 !important;
  }
  .care-card-box {
    border: 1px solid #ccc !important;
    box-shadow: 0 0 25px #e4e1e1 !important;
  }

}

/* ==================== 打印预览容器 ==================== */

.label-value {
  padding-left: 3px;
}
#print-preview-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 400px;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

#print-preview-content .print-template {
  font-size: 13px;
}

/* ==================== 模板A、B、D 通用样式 ==================== */
#print-preview-content .template-a .care-template-box,
#print-preview-content .template-b .care-template-box,
#print-preview-content .template-d .care-template-box {
  width: 256px;
  padding: 10px 36px;
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0 0 8px #b8b7b7;
}

/* 分割线 */
#print-preview-content .line-box {
  display: flex;
  justify-content: center;
}

#print-preview-content .line-box .ant-divider {
  width: 80%;
  margin: 10px 0;
}

#print-preview-content .line-box .top-divider {
  margin-bottom: 30px;
}

#print-preview-content .line-box .bottom-divider {
  margin-top: 18px;
}

/* 品牌区域 */
#print-preview-content .brand {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
}

#print-preview-content .brand-name {
  line-height: 44px;
}

#print-preview-content .brand-logo {
  width: 24px;
  display: block;
  height: 24px;
}

#print-preview-content .brand-img {
  width: 100%;
}

/* 内容区域 */
#print-preview-content .content-box {
  margin-top: -8px;
  margin-left: 38px;
}

#print-preview-content .label-item {
  margin-top: 4px;
}

#print-preview-content .label-item .title {
  display: block;
  margin-bottom: 4px;
}

#print-preview-content .label-item .content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#print-preview-content .component-text {
  padding: 0 4px;
  margin-top: 8px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* 其他信息区域 */
#print-preview-content .other-info {
  margin-left: 38px;
}

/* 洗涤方法区域 */
#print-preview-content .wash-box .wash-title {
  margin-left: 38px;
}

#print-preview-content .wash-box .wash-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-left: 24px;
}

#print-preview-content .wash-img {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

/* 备注区域 */
#print-preview-content .remark-box {
  margin-left: 12px;
  font-size: 12px;
  transform: scale(0.9);
}

/* 尺寸提示 */
#print-preview-content .template-a .size-hint,
#print-preview-content .template-b .size-hint,
#print-preview-content .template-d .size-hint {
  margin-top: 16px;
  font-weight: 900;
  color: #ff3232;
  text-align: center;
}

#print-preview-content .size-hint .hint-text {
  padding: 4px 10px;
  background-color: #fff;
}

/* ==================== 模板C 特有样式 ==================== */
#print-preview-content .template-c .care-card-box {
  width: 260px;
  padding: 68px 2px;
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0 0 8px #b8b7b7;
}

/* 上表格 */
#print-preview-content .template-c .top-table {
  padding-bottom: 8px;
  border: 1px solid #000;
}

#print-preview-content .template-c .table-row {
  display: block;
  padding: 0;
  line-height: 28px;
  box-sizing: border-box;
}

#print-preview-content .template-c .table-row.content-line {
  padding: 0 4px;
}

#print-preview-content .template-c .table-row.component-row {
  padding: 8px 0;
}

#print-preview-content .template-c .table-row.wash-row {
  padding: 0;
}

/* Row组件内部的边框处理 */
#print-preview-content .template-c .table-row > .ant-row {
  margin: 0 !important;
  width: 100%;
}

#print-preview-content .template-c .table-row .ant-col {
  padding: 0 4px;
  height: 100%;
}

#print-preview-content .template-c .wash-row .wash-list {
  margin-top: 8px;
  padding: 0 4px;
}

#print-preview-content .template-c .wash-row .ant-row {
  flex-wrap: nowrap;
}

#print-preview-content .template-c .wash-row .wash-img {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto;
}

#print-preview-content .template-c .wash-tip {
  margin-top: 4px;
  text-align: center;
}

#print-preview-content .template-c .data-title {
  margin-left: 4px;
}

#print-preview-content .template-c .component-text {
  margin-top: 1px;
  padding: 0 4px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* 下表格 */
#print-preview-content .template-c .bottom-table {
  margin-top: 8px;
  border: 1px solid #000;
}

#print-preview-content .template-c .brand-col {
  padding: 2px;
}

#print-preview-content .template-c .brand-img-full {
  width: 100%;
}

#print-preview-content .template-c .info-row {
  padding: 0;
  line-height: 40px;
}

#print-preview-content .template-c .info-row .info-col {
  padding-left: 4px;
}

#print-preview-content .template-c .info-row.goods-row {
  line-height: 62px;
  padding-left: 4px;
}

/* 边框 */
#print-preview-content .template-c .bottom-border {
  border-bottom: 1px solid #000 !important;
}

#print-preview-content .template-c .right-border {
  border-right: 1px solid #000 !important;
}

/* 确保Ant Design组件不会覆盖边框 */
#print-preview-content .template-c .ant-row.bottom-border {
  border-bottom: 1px solid #000 !important;
}

#print-preview-content .template-c .ant-col.right-border {
  border-right: 1px solid #000 !important;
}

/* 模板C的尺寸提示 */
#print-preview-content .template-c .size-hint {
  margin-top: 20px;
}

#print-preview-content .template-c .size-title {
  margin-bottom: 12px;
  text-align: center;
}

#print-preview-content .template-c .size-hint p {
  margin: 4px 0;
  color: #ff3232;
}

/* ==================== 工具类 ==================== */
#print-preview-content .text-center {
  text-align: center;
}

#print-preview-content .break-word {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

